<template>
  <!-- 指导页  -->
  <div class="container_AppGuidance">
    <!-- 底部轮播点 -->
    <div class="coontent_swiper">
      <van-swipe :loop="false">
        <van-swipe-item v-for="(item, index) in arr" :key="index">
          <div class="image_text">
            <van-image
              width="10rem"
              height="10rem"
              fit="cover"
              position="center"
              radius="15px"
              :src="item.image"
            />
            <p class="introduce">{{ item.imageText }}</p>
          </div>
          <!-- 中间内容 -->
          <div class="text_list">
            <van-card
              v-for="(service, serviceIndex) in item.items"
              :key="serviceIndex"
              :title="service.itemTitle"
              :thumb="service.itemImg"
              :desc="service.itemText"
            />
          </div>
        </van-swipe-item>
      </van-swipe>
    </div>

    <!-- button 可跳转  -->
    <div class="footer_button">
      <van-button
        class="button_skip"
        round
        color="#e5e7eb"
        type="default"
        text="Skip"
      ></van-button>
      <van-button
        round
        color="#55b394"
        type="success"
        text="Book Now"
        class="button_BookNow"
      ></van-button>
    </div>
  </div>
</template>

<script setup>
import { reactive, ref } from "vue";

let arr = reactive([
  {
    image:
      "http://mms1.baidu.com/it/u=3410512937,2446948562&fm=253&app=120&f=JPEG?w=800&h=800",
    imageText: "Choosing a Service Type",
    items: [
      {
        itemTitle: "Service Name",
        itemImg:
          "http://mms2.baidu.com/it/u=1296923423,699582248&fm=253&app=138&f=JPEG?w=500&h=375",
        itemText:
          "This is the description for Service 3.This is the description for Service 3.This is the description for Service 3.",
      },
      {
        itemTitle: "Service Name",
        itemImg:
          "http://mms2.baidu.com/it/u=1296923423,699582248&fm=253&app=138&f=JPEG?w=500&h=375",
        itemText:
          "This is the description for Service 3.This is the description for Service 3.This is the description for Service 3.",
      },
      {
        itemTitle: "Service Name",
        itemImg:
          "http://mms2.baidu.com/it/u=1296923423,699582248&fm=253&app=138&f=JPEG?w=500&h=375",
        itemText:
          "This is the description for Service 3.This is the description for Service 3.This is the description for Service 3.",
      },
    ],
  },
  {
    image:
      "http://mms1.baidu.com/it/u=3410512937,2446948562&fm=253&app=120&f=JPEG?w=800&h=800",
    imageText: "Choosing a Service Type",
    items: [
      {
        itemTitle: "Service Name",
        itemImg:
          "http://mms2.baidu.com/it/u=1296923423,699582248&fm=253&app=138&f=JPEG?w=500&h=375",
        itemText:
          "This is the description for Service 3.This is the description for Service 3.This is the description for Service 3.",
      },
      {
        itemTitle: "Service Name",
        itemImg:
          "http://mms2.baidu.com/it/u=1296923423,699582248&fm=253&app=138&f=JPEG?w=500&h=375",
        itemText:
          "This is the description for Service 3.This is the description for Service 3.This is the description for Service 3.",
      },
    ],
  },
  {
    image:
      "http://mms1.baidu.com/it/u=3410512937,2446948562&fm=253&app=120&f=JPEG?w=800&h=800",
    imageText: "Choosing a Service Type",
    items: [
      {
        itemTitle: "Service Name",
        itemImg:
          "http://mms2.baidu.com/it/u=1296923423,699582248&fm=253&app=138&f=JPEG?w=500&h=375",
        itemText:
          "This is the description for Service 3.This is the description for Service 3.This is the description for Service 3.",
      },
      {
        itemTitle: "Service Name",
        itemImg:
          "http://mms2.baidu.com/it/u=1296923423,699582248&fm=253&app=138&f=JPEG?w=500&h=375",
        itemText:
          "This is the description for Service 3.This is the description for Service 3.This is the description for Service 3.",
      },
      {
        itemTitle: "Service Name",
        itemImg:
          "http://mms2.baidu.com/it/u=1296923423,699582248&fm=253&app=138&f=JPEG?w=500&h=375",
        itemText:
          "This is the description for Service 3.This is the description for Service 3.This is the description for Service 3.",
      },
    ],
  },
]);
</script>

<style lang="less" scoped>
.container_AppGuidance {
  padding-top: 40px;

  ::v-deep(.coontent_swiper) {
    .van-swipe {
      height: 520px;

      // 轮播样式   // 轮播点
      .van-swipe__indicators {
        .van-swipe__indicator {
          width: 10px;
          height: 4px;
          border-radius: 5px;
          background-color: #53aa8b;
        }
      }

      .van-swipe-item {
        // 上面图片
        .image_text {
          display: flex;
          justify-content: center;
          flex-direction: column;
          align-items: center;
          .introduce {
            line-height: 40px;
            font-weight: bold;
            font-size: 15px;
          }
        }
        // 卡片列表
        .text_list {
          width: 85%;
          background-color: #fff;
          border-radius: 15px;
          padding: 15px;
          margin: 0 auto;
          .van-card {
            background-color: #fff;
            padding: 0;
            .van-card__header {
              // 左边图片
              .van-card__thumb {
                width: 50px;
                height: 50px;
                img {
                  object-fit: contain;
                }
              }
              // 右边文字
              .van-card__content {
                min-height: 70px;
                .van-card__title {
                  font-size: 16px;
                }
                .van-card__desc {
                  overflow: visible;
                  white-space: pre-wrap;
                  text-overflow: ellipsis;
                  line-height: 16px;
                  margin-top: 4px;
                }
              }
            }
          }
        }
      }
    }
  }
  .footer_button {
    width: 92%;
    display: flex;
    font-weight: bold;
    justify-content: space-between;
    margin: 20px auto 0;
    button {
      height: 40px;
    }
    .button_skip {
      width: 80px;
      color: #000 !important;
    }
    .button_BookNow {
      width: 250px;
    }
  }
}
</style>